<?php

namespace Products;

use Bank\BankUtils;

class Checking extends Deposit {
	private $period;
	private $amount;
	private $interestRate;
	public function __construct($period = 0, $amount = 0, $interestRate = 0) {
	}
	public function getPeriod() {
		return $this->period;
	}
	public function setPeriod($period) {
		$this->period = $period;
	}
	public function getAmount() {
		return $this->amount;
	}
	public function setAmount($amount) {
		$this->amount = $amount;
	}
	public function getInterestRate() {
		return $this->interestRate;
	}
	public function setInterestRate($interestRate) {
		$this->interestRate = $interestRate;
	}
	public function addInterest() {
		BankUtils::calculateDepositMonthlyPayment ( $this->getPeriod (), $this->getInterestRate () );
	}
	public function showInfo() {
		echo '<p>Checking</p>';
		echo '<p>Checkingt - period : ' . $this->getPeriod () . '</p>';
		echo '<p>Checking - amount : ' . $this->getAmount () . '</p>';
		echo '<p>Checking - interest rate: ' . $this->getInterestRate () * 100 . ' % </p>';
		echo '<p>Checking - monthly payment : ' . $this->addInterest () . '</p>';
	}
}
?>
